use std::path::Path;
use axum_common::minio;

#[tokio::test(flavor = "multi_thread")]
async fn test_put_object() {
    tracing_plus::init_tracing_log();
    let r = minio::put_object("123.txt", vec![96, 97, 98])
        .await
        .unwrap();
    println!("{r:?}")
}

#[tokio::test(flavor = "multi_thread")]
async fn get_put_object() {
    tracing_plus::init_tracing_log();
    let r = minio::get_object("123.txt")
        .await
        .unwrap();
    let size = r.content.to_file(Path::new("D:\\123.txt")).await.unwrap();
    println!("{size}")
}

#[tokio::test(flavor = "multi_thread")]
async fn delete_put_object() {
    tracing_plus::init_tracing_log();
    let r = minio::delete_object("123.txt")
        .await
        .unwrap();
   
    println!("{r:?}")
}
